﻿@using General.Entities
@model SysUser
@{
    ViewData["Title"] = "编辑系统用户";
}
<div class="breadcrumbs" id="breadcrumbs">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a href="@Url.RouteUrl("mainIndex")">首页</a>
        </li>
        <li><a href="@ViewBag.ReturnUrl">系统用户列表</a></li>
        <li class="active">@ViewBag.Title</li>
    </ul>
</div>

<div class="page-content">
    <div class="page-header">
        <h1>
            @ViewData["Title"]
        </h1>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <form asp-route="editUser" method="post" class="form-horizontal">
                @Html.HiddenFor(m => m.Id)
                <div asp-validation-summary="All"></div>
                @if (Model == null || Model.Id == Guid.Empty)
                {
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">账号 @Html.RequiredSpan()</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" asp-for="Account" placeholder="用户账号" /> 
                        </div>
                        <span class="inline text-danger" asp-validation-for="Account"></span>
                    </div>
                }
                else
                {
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">@Html.RequiredSpan()账号</label>
                        <div class="col-sm-9">
                            @Html.HiddenFor(m => m.Account)
                            <b>@Model.Account</b>
                        </div>
                    </div>
                }
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right">@Html.RequiredSpan()姓名</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" asp-for="Name" placeholder="真实姓名" /> 
                    </div>
                    <span class="inline text-danger" asp-validation-for="Name"></span>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right">手机号码</label>
                    <div class="col-sm-3">
                        <input type="text" asp-for="MobilePhone" class="form-control" placeholder="手机号码" /> 
                    </div>
                    <span asp-validation-for="MobilePhone" class="inline text-danger "></span>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right">邮箱地址</label>
                    <div class="col-sm-5">
                        <input type="text" asp-for="Email" class="form-control" placeholder="邮箱地址" />
                    </div>
                    <span asp-validation-for="Email" class="inline text-danger "></span>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right">性别</label>
                    <div class="radio">
                        <label>
                            @Html.RadioButtonFor(m => m.Sex, "男", new { @class = "ace", id = "sex1" })
                            <span class="lbl"> 男</span>
                        </label>
                        <label>
                            @Html.RadioButtonFor(m => m.Sex, "女", new { @class = "ace", id = "sex2" })
                            <span class="lbl"> 女</span>
                        </label>
                    </div>
                </div>
                <div class="col-md-offset-2 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="ace-icon fa fa-check bigger-110"></i>
                        提交
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>